package com.lagou.core.autoconfig;

import com.lagou.core.web.TomcatWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;

// FIXME 可以拓展配合 @Conditional 来实现动态注入
@Configuration
public class MyAutoConfig {

    @Bean
    public DispatcherServlet dispatcherServlet() {
        return new DispatcherServlet();
    }

    @Bean
    public TomcatWebServerFactory tomcatWebServerFactory() {
        return new TomcatWebServerFactory();
    }

}
